#import "Location.h"

@implementation Location
@synthesize stage,icon,res;

-(id)init:(int)type{
	if([super init]){
	icon =  @"location_chinastage.jpg";
	stage = @"location_chinastage.jpg";
	type=type%20;
	switch (type) {
		case EGYPT:
			res = @"Egypt";
			stage = @"location_egyptstage.jpg";
			x = 300;
			y = 230;
			element=type;
			break;
		case POLAND:
			res = @"Poland";
			stage = @"location_polandstage.jpg";
			x = 310;
			y = 120;
			element=type;
			break;
		case TURKEY:
			res = @"Turkey";
			stage = @"location_turkeystage.jpg";
			x = 340;
			y = 170;
			element=type;
			break;
		case CHINA:
			res = @"China";
			stage = @"location_chinastage.jpg";
			x = 480;
			y = 200;
			element=type;
			break;
		case PERU:
			res = @"Peru";
			stage = @"location_perustage.jpg";
			x = 100;
			y = 350;
			element=type;
			break;
		case GREECE:
			res = @"Greece";
			stage = @"location_greecestage.jpg";
			x = 290;
			y = 180;
			element=type;
			break;
		case TIBET:
			stage = @"location_tibetstage.jpg";
			res = @"Tibet";
			x = 400;
			y = 200;
			element=type;
			break;
		case NORWAY:
			res = @"Norway";
			x = 500;
			y = 200;
			element=type;
			break;
		case SKY:
			res = @"Heaven";
			x = 2*LOC_X;
			y = 0*LOC_Y;
			element=type;
			break;		
		case EARTH:
			res = @"Earth";
			x = 2*LOC_X;
			y = 4*LOC_Y;
			element=type;
			break;
		case WATER:
			res = @"Water";
			x = 0*LOC_X;
			y = 2*LOC_Y;
			element=type;
			break;
		case FIRE:
			res = @"Fire";
			x = 4*LOC_X;
			y = 2*LOC_Y;
			element=type;
			break;
		case WIND:
			res = @"Wind";
			x = 3*LOC_X;
			y = 3*LOC_Y;
			element=type;
			break;
		case THUNDER:
			res = @"Thunder";
			x = 1*LOC_X;
			y = 1*LOC_Y;
			element=type;
			break;
		case LAKE:
			stage = @"location_lake";
			res = @"Lake";
			x = 1*LOC_X;
			y = 3*LOC_Y;
			element=type;
			break;
		case MOUTAIN:
			res = @"Moutain";
			x = 3*LOC_X;
			y = 1*LOC_Y;
			element=type;
			break;
		default:
			res = @"location_lake";
			x = 0;
			y = 0;
			element=type;
			
	}
	element=type%8;
	x=200;
	y=200;
	}
	return self;
}
@end